﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Homework08
{
    //作业8 : 编程实现输入一个字符串并倒序输出
    internal class Homework08
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入字符串:");
            //键盘获取字符串
            string str = Console.ReadLine();
            //定义字符串数组
            string[] Arr = { str };
            char[] brr = new char[Arr[0].Length];
            for (int i = 0; i < Arr[0].Length; i++)
            {
                brr[i] = Arr[0][Arr[0].Length - 1 - i];
            }
            Console.WriteLine("倒序输出为:");
            for (int i = 0; i < brr.Length; i++)
            {
                Console.Write(brr[i]);
            }
        }
    }
}
